package com.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class UserService {
    @Resource
    @Lazy
    private OrderService orderService;

//    public void setOrderService(OrderService orderService) {
//        this.orderService = orderService;
//    }
//
//    public UserService(OrderService orderService) {
//        this.orderService = orderService;
//        System.out.println("2");
//    }
//
//    public  UserService() {
//        System.out.println("1");
//    }
    public void  test() {
        System.out.println(orderService);
        orderService.test();
    }
}
